package net.kesumu.yushabuserver.entity;

import java.sql.Timestamp;
import java.util.Date;

public class YushabuMessage {
    
    public static final int STATE_INITIATED = 0,
                            STATE_RECEIVED = 1;

    private int messageId;
    private String content;
    private Timestamp sendTime;
    private int state;
    private int userId;
    private int sessionId;
    private int friendUserId;
    
    public YushabuMessage() {
    }
    public YushabuMessage(int uid, int fid, String cnt) {
        userId = uid;
        friendUserId = fid;
        content = cnt;
        java.util.Date date = new Date();
        sendTime = new java.sql.Timestamp(date.getTime());
        state = STATE_INITIATED;
    }

    public int getMessageId() {
        return messageId;
    }

    public void setMessageId(int messageId) {
        this.messageId = messageId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Timestamp getSendTime() {
        return sendTime;
    }

    public void setSendTime(Timestamp sendTime) {
        this.sendTime = sendTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getSessionId() {
        return sessionId;
    }

    public void setSessionId(int sessionId) {
        this.sessionId = sessionId;
    }

    public int getFriendUserId() {
        return friendUserId;
    }

    public void setFriendUserId(int friendUserId) {
        this.friendUserId = friendUserId;
    }

    public static int getStateInitiated() {
        return STATE_INITIATED;
    }

    public static int getStateReceived() {
        return STATE_RECEIVED;
    }
    

}
